Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBX-2936 Set up automated releases for Hibernate Tools #4962

Conversation

marko-bekhta
Copy link
Member

https://hibernate.atlassian.net/browse/HBX-2936

Release scripts that we have are using the maven wrapper (mwnv.) Hence this PR adds it. Tools inherit the JBoss parent and it has min maven version defined as 3.6.2 so that's the version for which the wrapper is generated. I'm not sure what version is actually used by the Tools if it's different from the one defined in that parent...

Then the following commit:

  • explicitly skips the maven-deploy-plugin
  • adds the nexus staging plugin that is used for deployment instead
  • adds the gpg plugin to sign the published artifacts.

Deployment is deferred till the "reports" module execution, which is the last one.

By default, gpg signing and staging of artifacts by nexus plugins are skipped (deploy.skip=true) and it is enabled in each module that has to be published explicitly by setting deploy.skip=false.

Run this locally and got these artifacts staged:

org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT.jar=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:n/a:jar:jar:hibernate-tools-utils-7.0.0-SNAPSHOT.pom:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT-sources.jar=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:sources:java-source:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT-javadoc.jar=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:javadoc:javadoc:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT.jar.asc=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:n/a:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT.pom.asc=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:n/a:pom.asc:pom.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT-sources.jar.asc=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:sources:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-utils/7.0.0-SNAPSHOT/hibernate-tools-utils-7.0.0-SNAPSHOT-javadoc.jar.asc=org.hibernate.tool:hibernate-tools-utils:7.0.0-SNAPSHOT:javadoc:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT.jar=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:n/a:jar:jar:hibernate-tools-orm-7.0.0-SNAPSHOT.pom:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT-sources.jar=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:sources:java-source:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT-javadoc.jar=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:javadoc:javadoc:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT.jar.asc=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:n/a:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT.pom.asc=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:n/a:pom.asc:pom.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT-sources.jar.asc=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:sources:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm/7.0.0-SNAPSHOT/hibernate-tools-orm-7.0.0-SNAPSHOT-javadoc.jar.asc=org.hibernate.tool:hibernate-tools-orm:7.0.0-SNAPSHOT:javadoc:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT.jar=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:n/a:jar:jar:hibernate-tools-orm-jbt-7.0.0-SNAPSHOT.pom:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT-sources.jar=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:sources:java-source:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT-javadoc.jar=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:javadoc:javadoc:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT.jar.asc=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:n/a:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT.pom.asc=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:n/a:pom.asc:pom.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT-sources.jar.asc=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:sources:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-orm-jbt/7.0.0-SNAPSHOT/hibernate-tools-orm-jbt-7.0.0-SNAPSHOT-javadoc.jar.asc=org.hibernate.tool:hibernate-tools-orm-jbt:7.0.0-SNAPSHOT:javadoc:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT.jar=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:n/a:maven-plugin:jar:hibernate-tools-maven-7.0.0-SNAPSHOT.pom:hibernate-tools:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT-sources.jar=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:sources:java-source:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT-javadoc.jar=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:javadoc:javadoc:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT.jar.asc=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:n/a:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT.pom.asc=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:n/a:pom.asc:pom.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT-sources.jar.asc=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:sources:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-maven/7.0.0-SNAPSHOT/hibernate-tools-maven-7.0.0-SNAPSHOT-javadoc.jar.asc=org.hibernate.tool:hibernate-tools-maven:7.0.0-SNAPSHOT:javadoc:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT.jar=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:n/a:jar:jar:hibernate-tools-ant-7.0.0-SNAPSHOT.pom:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT-sources.jar=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:sources:java-source:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT-javadoc.jar=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:javadoc:javadoc:jar:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT.jar.asc=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:n/a:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT.pom.asc=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:n/a:pom.asc:pom.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT-sources.jar.asc=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:sources:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots
org/hibernate/tool/hibernate-tools-ant/7.0.0-SNAPSHOT/hibernate-tools-ant-7.0.0-SNAPSHOT-javadoc.jar.asc=org.hibernate.tool:hibernate-tools-ant:7.0.0-SNAPSHOT:javadoc:jar.asc:jar.asc:n/a:n/a:ossrh-snapshots-repository:https://oss.sonatype.org/content/repositories/snapshots

Note that the list above is missing the hibernate-tools-gradle. Looking at what it's publishing https://repo1.maven.org/maven2/org/hibernate/tool/hibernate-tools-gradle/7.0.0.Beta1/ it seems like an empty jar ... so I wasn't sure whether that should be included.

And last but not least... Adding the maven flatten plugin is to make the POMs for the artifacts we publish not reference any parent POMs. This way, we wouldn't need to publish hibernate-tools-parent

Opening this a draft for now. Will need to check with @koentsje to see if nothing is missing and to better understand what should happen with that gradle module. (maybe ping me on Monday?)

Once everything is okay, we can create a job on CI. ( and probably backport this patch to other maintained branches ...)

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Nov 29, 2024

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.

it is used in the release scripts hence would be best if Tools come with one already rather that rely on scripts to generate the wrapper.
so that we do not need to publish parent POMs
@marko-bekhta marko-bekhta force-pushed the build/HBX-2936-Set-up-automated-releases-for-Hibernate-Tools branch from f6733aa to 6e6ac3a Compare November 29, 2024 18:09
@marko-bekhta marko-bekhta force-pushed the build/HBX-2936-Set-up-automated-releases-for-Hibernate-Tools branch 5 times, most recently from 2668857 to c043280 Compare December 2, 2024 14:32
as it is build by Gradle, and we need to add an extra jar to the artifacts we publish
@marko-bekhta marko-bekhta force-pushed the build/HBX-2936-Set-up-automated-releases-for-Hibernate-Tools branch from c043280 to b993d3f Compare December 2, 2024 14:44
@marko-bekhta marko-bekhta marked this pull request as ready for review December 2, 2024 14:55
Copy link
Member

@koentsje koentsje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. The merge is imminent. Thanks for your work!

@koentsje koentsje merged commit b993d3f into hibernate:main Dec 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants